<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>编辑地址</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">
    <link rel="stylesheet" th:href="@{/wxui/lib/weui.min.css}"/>
    <link rel="stylesheet" th:href="@{/wxui/css/jquery-weui.css}"/>
    <link rel="stylesheet" th:href="@{/wxui/css/style.css}"/>
</head>
<body ontouchstart>
<!--主体-->
<header class="wy-header">
    <div class="wy-header-icon-back"><span></span></div>
    <div class="wy-header-title">微信扫码支付</div>
</header>
<div align="center" style="margin-top: 50px;">
    <img th:src="@{/wxui/images/wxQr.png}"/>
</div>
<div class="mg10-0 t-c">金额：<span class="wy-pro-pri mg-tb-5">¥<em class="num font-20" th:text="${sum}"></em></span></div>
<script th:src="@{/wxui/lib/jquery-2.1.4.js}"></script>
<script th:src="@{/wxui/lib/fastclick.js}"></script>
<script type="text/javascript" th:src="@{/wxui/js/jquery.Spinner.js}"></script>
<script th:src="@{/wxui/js/jquery-weui.js}"></script>
<script th:src="@{/wxui/js/city-picker.js}"></script>
<script th:inline="javascript" type="text/javascript">
    $(function () {
        var orderId = [[${orderId}]];
        $.confirm("确定支付?", function () {
            $.ajax({
                url: "/orderInfo/frontStage/payForWx",
                dataType: "json",
                data: {
                    id: orderId
                },
                type: "post",
                success: function (data) {
                    if (data.code == 200) {
                        $.toast(data.msg),
                            setTimeout('location.href="/orderInfo/frontStage/goSuccessPage"', 1000)
                    } else {
                        $.toast(data.msg)
                    }
                }
            })
        }, function () {
            //取消操作
        });

        FastClick.attach(document.body);
        $(".wy-header-icon-back").click(function () {
            window.history.back();
        });
    });
</script>
</body>
</html>
